<%@page import="bean.PortfolioVo"%>
<%@page import="java.util.ArrayList"%>
<%@page import="bean.portDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src='/kiSunnyShop/js/port.js'></script>


<style type="text/css">
img {

	max-width: 80px;
	max-height:80px;
}
.btnStyle { color: #FFF; background-color: #666; margin: 5px; padding-top: 5px; padding-right: 10px;
 padding-bottom: 5px; padding-left: 10px; border: 1px solid #000; }
#wrap{width:1150px;}

.lbl{
	display : inline-block;
	width : 100px;
	text-align : right;
	marigin : 3px;}
	
.list_title{
	background-color: #0080c0;}
	
.list_title>div{
	display: inline-block;
	text-align: center;
	color: white;}

.list_items{
	padding: 4px;
	border-bottom: 1px solid #0080c0;}	
	
.list_items>div{
	display: inline-block;}

.view_title{
	padding: 4px;
	background-color: #0080c0;
	font-size: x-large;
	color: white;
}
.view_elements>div{
	margin-left : 20px;
	display : inline-block;
	font-size: small;
	float: right;
}	
	

#list_b_photo{width: 80px; text-align: center;margin-right:2%;}
#list_b_title{width: 150px; text-align: left;}
#list_content{width: 300px; text-align: center;}
#list_writter{width: 200px; text-align: center;}
#list_wdate{width:200px; text-align: center;}
#list_review{width:100px; text-align: center;}

#title_boardLine{width:1150px;height:2px;border-bottom:1px solid #0080c0;}
.bottommenu>div{
	display: inline-block;
}
</style>
<title>shoping room</title>
</head>
<body>
<%request.setCharacterEncoding("utf-8");%>
<jsp:useBean id='vo' class='bean.PortfolioVo' scope='page'/>
<jsp:setProperty property="*" name="vo"/>

<%
	request.setCharacterEncoding("utf-8");
	portDTO dto = new portDTO();
	dto.setVo(vo);
	ArrayList<PortfolioVo> al = dto.select();	
%>



<!-- <form id='portFrm' method='post'> 상태 저장 form -->
<%-- 	<input type='hidden' name='nowPage' value=<%=vo.getNowPage()%>> --%>
<%-- 	<input type='hidden' name='find' value=<%=vo.getFind()%>> --%>
<%-- 	<input type='hidden' name='rno' value=<%=vo.getRno()%>>	 --%>
		
<!-- </form> -->



<form id='portFrm' method='post'> <!-- 상태 저장 form -->
	<input type='hidden' name='nowPage' value=<%=vo.getNowPage()%>>
	<input type='hidden' name='find' value=<%=vo.getFind()%>>
	<input type='hidden' name='rno' value=<%=vo.getRno()%>>	
		
</form>
<!-- 검색 -->
<form name='port_list_frm' method='post' action='index1.jsp'>
		
		<input type='text' name='find' value='<%=vo.getFind()%>'>
		<input type='submit' value='검색'>
		<input type='button' id='btnInput' value='글쓰기'>
	</form>
	<div id = 'wrap' align="center">
	<h1 id="title" align="center" style="color: #0080ff;">제품후기 게시판</h1>
    	<div class = 'list_title'>
		<div id='list_b_photo'>이미지</div>
		<div id='list_b_title'>상품명</div>
		<div id='list_content'>내용</div>
		<div id='list_writter'>작성자</div>
		<div id='list_wdate'>작성일</div>
		<div id='list_review'>HIT</div>
	</div>
<div id="title_boardLine"></div>
<!-- 사진 이미지 출력 -->
<%for(int a=0; a<al.size(); a++){PortfolioVo v = al.get(a);%>

	<div class='list_items'>
		<div id='list_b_photo'><a href='#' style="text-decoration:none" onclick='goView1(<%=dto.getNowPage()%>,<%=v.getRno()%>)' >
		<img src="/kiSunnyShop/memberPhoto/<%=v.getPhoto() %>"/></a></div>
		
		<div id='list_b_title'><%=v.getSubject()%></div>
		<div id='list_content' align="left"><font size ='2'><%=v.getContent()%></font></div>
		<div id='list_writter'><%=v.getWriter()%></div>		
		<div id='list_wdate'><%=v.getWdate() %></div>	
		<div id='list_review'><%=v.getReview() %></div>	
	</div>

<%}%>
</div>

<!-- <!-- 검색 --> -->
<!-- <form name='port_list_frm' method='post' action='index1.jsp'> -->
		
<%-- 		<input type='text' name='find' value='<%=vo.getFind()%>'> --%>
<!-- 		<input type='submit' value='검색'> -->
<!-- 		<input type='button' id='btnInput' value='글쓰기'> -->
<!-- 	</form> -->
     
<!-- <a href='#' style="text-decoration:none" onclick='goPage(1)'>◀</a> -->
<%-- <%if(dto.getStartPage() !=1){%> --%>
<%-- <a href='#'  style="text-decoration:none" onclick='goPage(<%=dto.getStartPage()-1%>)'>◁</a> --%>
<%-- <%} %> --%>


<!-- <!-- 페이지 뷰 --> -->

<%-- <%  --%>
// int i=0;
// for(i=dto.getStartPage(); i<=dto.getEndPage(); i++)
<%-- {%> --%>
<%-- 	<a href='#' onclick='goPage(<%=i%>)'><%=i%></a> --%>
<%-- <% }%> --%>

<%-- <%if(dto.getTotPage() != dto.getEndPage()){ %> --%>
<%-- <a href='#' style="text-decoration:none" onclick='goPage(<%=i%>)'>▷</a> --%>
<%-- <%} %> --%>
<%-- <a href='#' style="text-decoration:none" onclick='goPage(<%=dto.getTotPage()%>)'>▶</a>	 --%>


		

<script>listInit();</script>
</body>
</html>